﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="paperview.aspx.cs" Inherits="OnlineTestUI.paperview" %>

<%@ Import Namespace="OnlineTestModel" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script type="text/javascript" src="Scripts/jquery-1.10.2.js"></script>
    <script type="text/javascript" src="Scripts/json2.js"></script>
    <script type="text/javascript">
        function intToLetter(id) {
            var str = "";
            if (Math.floor((id / 65)) != 0) {
                str = String.fromCharCode(id);//65 代表'A'的ASCII值.
            }
            //String.fromCharCode(num):求出num数值对应的字母.num应该为ASCII中的值.
            return str;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server" onsubmit="getPaper()" method="post">
        <%=p.PaperName %>>
        <div>
            <% for (int i = 0; i < PqeList.Count; i++)
               {
                   PaperQuestionEx item = PqeList[i];
                   switch (item.QuestionTypeId)
                   {
                       case 1: sq = GetSq(item.QuestionId);%><div style="visibility: visible;" tabindex="-1" class="div_question div_question_mouseout">
                           <input class="questiontype" type="hidden" value="<%=item.QuestionTypeId %>" />
                           <div class="div_preview">
                               <div class="div_title_question_all">
                                   <div class="div_topic_question">1.<%=item.BigQuestion%><%=item.SmallQuestion%></div>
                                   <div class="div_title_question"><span><%=item.QuestionName%></span></div>
                                   <div style="clear: both;"></div>
                               </div>
                               <div class="div_table_radio_question">
                                   <div class="div_table_clear_top"></div>
                                   <ul>
                                       <% foreach (var questionItem in GetQi(item.QuestionId))
                                                    {%><li style="width: 99%;">
                                  <input type="radio"><%=questionItem.ItemName%></li>
                                                  <%
                                                    }%>

                                       <div style="clear: both;"></div>
                                   </ul>
                                   所填答案：<%=sq.Answer%>
                                      正确答案：<%=item.CorrectAnswer%>
                                      此题分数：<%=item.Score%>
                                      所得分数：<%=sq.Score%>
                                   <div class="div_table_clear_bottom"></div>
                               </div>

                               <div style="clear: both;"></div>
                           </div>
                       </div>
            <%; break;
                       case 2: sq = GetSq(item.QuestionId);%><div style="visibility: visible;" tabindex="-1" class="div_question div_question_mouseout">
                           <input class="questiontype" type="hidden" value="<%=item.QuestionTypeId %>" />
                           <div class="div_preview">
                               <div class="div_title_question_all">
                                   <div class="div_topic_question">1.</div>
                                   <div class="div_title_question"><span><%=item.QuestionName%></span></div>
                                   <div style="clear: both;"></div>
                               </div>
                               <div class="div_table_radio_question">
                                   <div class="div_table_clear_top"></div>

                                   <input id="<%=item.QuestionId%>" data-score="<%=item.Score%>" name="<%=item.QuestionId%>" type="text" />

                                   <div style="clear: both;"></div>
                                   所填答案：<%=sq.Answer%>
                                      正确答案：<%=item.CorrectAnswer%>
                                      此题分数：<%=item.Score%>
                                      所得分数：<%=sq.Score%>
                                   <div class="div_table_clear_bottom"></div>
                               </div>


                               <div style="clear: both;"></div>
                           </div>
                       </div>
            <%; break;
                       case 3: sq = GetSq(item.QuestionId);%><div style="visibility: visible;" tabindex="-1" class="div_question div_question_mouseout">
                           <input class="questiontype" type="hidden" value="<%=item.QuestionTypeId %>" />
                           <div class="div_preview">
                               <div class="div_title_question_all">
                                   <div class="div_topic_question">1.</div>
                                   <div class="div_title_question"><span><%=item.QuestionName%></span></div>
                                   <div style="clear: both;"></div>
                               </div>
                               <div class="div_table_radio_question">
                                   <div class="div_table_clear_top"></div>
                                   <ul>
                                       <input type="radio" data-score="<%=item.Score%>" name="<%=item.QuestionId%>" value="正确" />
                                       正确
                                                      <br />
                                       <input type="radio" data-score="<%=item.Score%>" name="<%=item.QuestionId%>" value="错误" />
                                       错误

                                                      <div style="clear: both;"></div>
                                   </ul>
                                   <div class="div_table_clear_bottom"></div>
                                   所填答案：<%=sq.Answer%>
                                      正确答案：<%=item.CorrectAnswer%>
                                      此题分数：<%=item.Score%>
                                      所得分数：<%=sq.Score%>

                               </div>
                               <div class="div_ins_question"></div>
                               <div style="clear: both;"></div>
                           </div>
                       </div>
            <%; break;
                       case 4: sq = GetSq(item.QuestionId);%><div style="visibility: visible;" tabindex="-1" class="div_question div_question_mouseout">
                           <input class="questiontype" type="hidden" value="<%=item.QuestionTypeId %>" />
                           <div class="div_preview">
                               <div class="div_title_question_all">
                                   <div class="div_topic_question">1.</div>
                                   <div class="div_title_question"><span><%=item.QuestionName%></span></div>
                                   <div style="clear: both;"></div>
                               </div>
                               <div class="div_table_radio_question">
                                   <div class="div_table_clear_top"></div>
                                   <ul>
                                       <textarea class="inputtext" data-score="<%=item.Score%>" name="<%=item.QuestionId%>" style="width: 62%; height: 90px; overflow: auto;" rows="1" wrap="soft"></textarea>

                                       <div style="clear: both;"></div>
                                   </ul>
                                   <div class="div_table_clear_bottom"></div>
                                   所填答案：<%=sq.Answer%>
                                      正确答案：<%=item.CorrectAnswer%>
                                      此题分数：<%=item.Score%>
                                      所得分数：<%=sq.Score%>
                               </div>
                               <div class="div_ins_question"></div>

                               <div style="clear: both;"></div>
                           </div>
                       </div>
            <%; break;
                   }
               }%>
        </div>


        <asp:Button ID="Button2" runat="server" Text="提交答卷" OnClick="BtAdd_Click" />


    </form>
</body>
</html>
